package demo3;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;


/**
 * Created by Mikazuki on 2025/3/28.
 */
@Component
public class Person {
    @Resource(type = Shirt.class)
    private Cloth cloth;
    //添加一个sayHi方法
    public void play(){
        cloth.wear();
        System.out.println("person:play");
    }
}
